// 命令行交互工具
const inquirer = require('inquirer')
// 导入配置
const config = require('../../config')
// 导入下载模块
const downloadFun = require('./download')
const action = async (project, args) => {
    const answer = await inquirer.prompt([{
        type: 'list',
        name: 'framework',
        choices: config.framework,
        message: '请选择要使用的框架'
    }])
    // console.log(answer)
    // 下载代码模版
    downloadFun(config.frameworkUrl[answer.framework], project)
}

module.exports = action
